#!/bin/sh

start(){
        /sbin/ip  link set can0 down
        /sbin/ip link set can0 type can bitrate 500000
        /sbin/ip link set can0 up
}

stop(){
        /sbin/ip  link set can0 down
}

restart()
{
        start
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart|reload)
                restart
                ;;
        *)
                echo "Usage: $0 {start|stop|restart}"
                exit 1
esac
exit $?
